import App from './App.vue'
import '@/assets/element/iconfont.css'

import './style.css'

import { createApp } from 'vue'

import { setupDefaultCss } from './plugins/setupDefaultCss'
import { setupRouter } from './plugins/setupRouter'
import { setupTitleLogo } from './plugins/setupTitleLogo'
import { setupPinia } from './plugins/setupPinia'
import { setupElementPlus } from './plugins/setupElementPlus'
import { setupEmitter } from './plugins/setupEmmitter'
import { setupFormCreate } from './plugins/setupFormCreate'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

app.config.warnHandler = () => null

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

setupDefaultCss()

setupPinia(app)

setupRouter(app)

setupTitleLogo(app)

setupElementPlus(app)

setupEmitter(app)

setupFormCreate(app)

app.mount('#app')
